/*
 * @Author: Dufen~123 dufen.0
 * @Date: 2024-11-26 15:28:40
 * @LastEditors: Dufen~123 dufen.0
 * @LastEditTime: 2024-11-26 15:44:24
 * @FilePath: \my-app\src\api\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import http from "./axios";
export const getData=()=>{
    return http.request({
        url:'home/getData',
        method:'get'
    })
}
//user组件table的数据，params是参数，分页和搜索都需要传参
export const getUser=(params)=>{
    return http.request({
        url:'user/getUser',
        method:'get',
        params
    })
}
//新增
export const addUser=(data)=>{
    return http.request({
        url:'user/createUser',
        method:'post',
        data
    })
}
//编辑
export const editUser=(data)=>{
    return http.request({
        url:'user/editUser',
        method:'post',
        data
    })
}

//删除
export const deleteUser=(data)=>{
    return http.request({
        url:'user/delUser',
        method:'post',
        data
    })
}

//登录
export const getMenu=(data)=>{
    return http.request({
        url:'permission/getMenu',
        method:'post',
        data
    })
}